;
(function() {
	var xto = require("../../my_modules/xto/index");
	var ResponObj = require("../_include/responObj");
	module.exports = {
		prefix: "/express_search",
		get: {
			"/": function() {
				var self = this;
				var query = self.request.query;
				var num = (query.num||"").trim();
				var company = (query.company||"").trim();
				xto.query(num, company, function(success, errorCode, data) {
					if (success) {
						self.body = ResponObj("json", data);
					} else {
						console.log("Express Error:", errorCode);
						self.body = ResponObj("error", "查询失败")
					}
				});
			}
		}
	}
}());